package cn.com.easyfelling.service.impl;

import cn.com.easyfelling.dao.AccountDao;
import cn.com.easyfelling.dao.impl.AccountDaoImpl;
import cn.com.easyfelling.service.AccountService;
import cn.com.easyfelling.utils.Transaction;

public class AccountServiceImpl implements AccountService {

//  AccountDao iAccountDao = new AccountDaoImpl();


  @Override
  public boolean transferAccount(Integer fromId, Integer toId, float amount) {
//    Transaction.begin();
//    try {
//      iAccountDao.updateAccount(fromId, -amount);
//      float i = 1/0;
//      iAccountDao.updateAccount(toId, amount);
//      Transaction.commit();
//      return true;
//    }catch (Exception e) {
//      e.printStackTrace();
//      Transaction.rollback();
//      return false;
//    }
    return false;
  }
}
